package com.system.validation.annation;


import com.system.validation.component.IsIntegerValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @Classname IsInteger
 * @Description TODO
 * @Date 2023/1/14 19:41
 * @Created by XiongXiong
 * @Author: X.I.O
 */
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@Constraint(validatedBy = {IsIntegerValidator.class})
public @interface IsInteger {

    /**
     * 是否需要校验
     * @return  boolean
     */
    boolean required() default true;

    String message() default "校验是否是数字";

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };
}
